import sys
from math import sqrt

def main():
  n = [0 for i in range(15)]
  mean = [0.0 for i in range(15)]
  M2 = [0.0 for i in range(15)]
  for line in sys.stdin:
    toks = line.strip().split()
    speed = int(toks[1])
    dist = int(toks[4])
    time = int(toks[5])
    # now, use Knuth variance
    x = (100.0*dist)/time
    n[speed] += 1
    delta = x-mean[speed]
    mean[speed] += (1.0*delta)/n[speed]
    M2[speed] += (1.0*delta)*(x-mean[speed])
  for i in range(15):
    if n[i] <= 1:
      sigma = 0.0
    else:
      sigma = sqrt(M2[i]/(n[i]-1));
    print i, n[i], mean[i], sigma

if __name__ == '__main__':
  main()
